package com.yunji.aggregate.mapper;

import com.yunji.common.model.cache.ContainerTypeCacheDTO;
import com.yunji.common.model.domain.SiteLocationDO;
import com.yunji.common.model.domain.StaffDO;
import org.apache.ibatis.annotations.Select;

/**
 * @author : peter-zhu
 * @date : 2024/12/19 17:00
 * @description : TODO
 **/
public interface ICommonMapper {
    @Select("select * from staff where id= #{staffId} ")
    StaffDO getStaff(Long staffId);

    @Select("select * from t_container_type where type_code= #{typeCode}")
    ContainerTypeCacheDTO getCabinetTypeCode(String typeCode);

    @Select("select belong_name from v3_belong where belong_id = #{belongId} ")
    String getBelongName(Long belongId);

    @Select("select agent_name from s_agent_user where id = #{agentId} ")
    String getAgentName(Long agentId);

    @Select("select site_name from t_site where id = #{siteId} ")
    String getSiteName(Long siteId);

    @Select("select location_type_name from tm_site_location_type where location_type_id = #{locationTypeId} ")
    String getLocationTypeName(Long locationTypeId);

    @Select("select location_name from tm_site_location where location_id = #{locationId} ")
    String getLocationName(Long locationId);

    @Select("select * from tm_site_location where location_id = #{locationId} ")
    SiteLocationDO getSiteLocation(Long locationId);

    @Select("select product_name from product where id = #{productId} ")
    String getProductName(Long productId);
}
